use ndarray::Array4;
use rstest::rstest;

use crate::tests::common::enforce_types_are_equal;
use crate::tests::fixtures::{rand_usize, TILE_CONNECTION_TILES};
use crate::tiling::tiles::{ArrayInitializable, Tile, TileConnection, TileConnectionArray};

#[test]
fn test_array_initializable() {
    struct MockArray;

    // Implementing ArrayInitializable for MockArray forces ArrayInitializable to
    // exist and exhibit the desired interface.
    impl ArrayInitializable for MockArray {
        fn new(_tiles: &Vec<Tile>) -> Self {
            Self
        }
    }

    let _ = MockArray::new(&vec![]);
}

#[test]
fn test_tile_connection_array_is_array4_tile_connection() {
    let north_connector_count = rand_usize(0, 5);
    let east_connector_count = rand_usize(0, 5);
    let south_connector_count = rand_usize(0, 5);
    let west_connector_count = rand_usize(0, 5);
    enforce_types_are_equal(
        Array4::<TileConnection>::default((
            north_connector_count,
            east_connector_count,
            south_connector_count,
            west_connector_count,
        )),
        TileConnectionArray::default((
            north_connector_count,
            east_connector_count,
            south_connector_count,
            west_connector_count,
        )),
    )
}

// noinspection RsTraitObligations
#[test]
fn test_tile_connection_array_implements_array_initializable() {
    fn enforce_type_implements_array_initializable<T: ArrayInitializable>(_: T) {}

    enforce_type_implements_array_initializable(TileConnectionArray::default((0, 0, 0, 0)));
}

#[rstest]
// The following tests are automatically generated by tests/generate_tile_connection_array_cases.py.
// They are not intended for manual editing.
// generated tests start
// region zero tiles
#[case::zero_tiles(
    vec![],
    1,
    1,
    vec![
        // tile_connection_array[0, 0, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
    ]
)]
// endregion
// region one tile, all connectors match their counterpart
#[case::one_tile_all_connectors_match_their_counterpart(
    vec![TILE_CONNECTION_TILES[0].clone()],
    2,
    2,
    vec![
        // tile_connection_array[0, 0, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[0, 0, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[0, 0, 1, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[0, 0, 1, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[0, 1, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[0, 1, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[0, 1, 1, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[0, 1, 1, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[1, 0, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[1, 0, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[1, 0, 1, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[1, 0, 1, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[1, 1, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[1, 1, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[1, 1, 1, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
        // tile_connection_array[1, 1, 1, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[0].weight],
        },
    ]
)]
// endregion
// region one tile, no connectors match their counterpart
#[case::one_tile_no_connectors_match_their_counterpart(
    vec![TILE_CONNECTION_TILES[1].clone()],
    3,
    3,
    vec![
        // tile_connection_array[0, 0, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 0, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 0, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 0, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 0, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
    ]
)]
// endregion
// region one tile, one connector matches its counterpart
#[case::one_tile_one_connector_matches_its_counterpart(
    vec![TILE_CONNECTION_TILES[2].clone()],
    2,
    3,
    vec![
        // tile_connection_array[0, 0, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[0, 0, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[0, 0, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[0, 0, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[0, 1, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[0, 1, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[0, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[0, 1, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[1, 0, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[1, 0, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[1, 0, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[1, 0, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[1, 1, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[1, 1, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[1, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[1, 1, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[2].weight],
        },
        // tile_connection_array[2, 0, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
    ]
)]
// endregion
// region two tiles
#[case::two_tiles(
    vec![TILE_CONNECTION_TILES[1].clone(), TILE_CONNECTION_TILES[3].clone()],
    5,
    3,
    vec![
        // tile_connection_array[0, 0, 0, 0]
        TileConnection {
            tiles: vec![0, 1],
            weights: vec![
                TILE_CONNECTION_TILES[1].weight,
                TILE_CONNECTION_TILES[3].weight
            ],
        },
        // tile_connection_array[0, 0, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 0, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 0, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[0, 0, 1, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[0, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 1, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[0, 0, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 0, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 0, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 0, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[0, 3, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 0, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[0, 3, 1, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[0, 3, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 1, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[0, 3, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 0, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 0, 1, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 1, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 0, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 0, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 3, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 0, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 3, 1, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 3, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 1, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 3, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
    ]
)]
// endregion
// region three tiles
#[case::three_tiles(
    vec![
        TILE_CONNECTION_TILES[1].clone(),
        TILE_CONNECTION_TILES[3].clone(),
        TILE_CONNECTION_TILES[4].clone(),
    ],
    5,
    4,
    vec![
        // tile_connection_array[0, 0, 0, 0]
        TileConnection {
            tiles: vec![0, 1, 2],
            weights: vec![
                TILE_CONNECTION_TILES[1].weight,
                TILE_CONNECTION_TILES[3].weight,
                TILE_CONNECTION_TILES[4].weight
            ],
        },
        // tile_connection_array[0, 0, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 0, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 0, 4]
        TileConnection {
            tiles: vec![1, 2],
            weights: vec![
                TILE_CONNECTION_TILES[3].weight,
                TILE_CONNECTION_TILES[4].weight
            ],
        },
        // tile_connection_array[0, 0, 1, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[0, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 1, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[0, 0, 2, 0]
        TileConnection {
            tiles: vec![0, 2],
            weights: vec![
                TILE_CONNECTION_TILES[1].weight,
                TILE_CONNECTION_TILES[4].weight
            ],
        },
        // tile_connection_array[0, 0, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 0, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 2, 4]
        TileConnection {
            tiles: vec![2],
            weights: vec![TILE_CONNECTION_TILES[4].weight],
        },
        // tile_connection_array[0, 0, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 0, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 1, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[0, 2, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 2, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 0, 0]
        TileConnection {
            tiles: vec![1, 2],
            weights: vec![
                TILE_CONNECTION_TILES[3].weight,
                TILE_CONNECTION_TILES[4].weight
            ],
        },
        // tile_connection_array[0, 3, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 0, 4]
        TileConnection {
            tiles: vec![1, 2],
            weights: vec![
                TILE_CONNECTION_TILES[3].weight,
                TILE_CONNECTION_TILES[4].weight
            ],
        },
        // tile_connection_array[0, 3, 1, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[0, 3, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 1, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[0, 3, 2, 0]
        TileConnection {
            tiles: vec![2],
            weights: vec![TILE_CONNECTION_TILES[4].weight],
        },
        // tile_connection_array[0, 3, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 2, 4]
        TileConnection {
            tiles: vec![2],
            weights: vec![TILE_CONNECTION_TILES[4].weight],
        },
        // tile_connection_array[0, 3, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 3, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[0, 4, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 0, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 0, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 1, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 0, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 0, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 2, 0]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 2, 1]
        TileConnection {
            tiles: vec![0],
            weights: vec![TILE_CONNECTION_TILES[1].weight],
        },
        // tile_connection_array[1, 2, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 2, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 3, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[1, 4, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 0, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 0, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 0, 1, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 1, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 0, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 0, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 1, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 2, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 0, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 3, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 0, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 3, 1, 0]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 3, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 1, 4]
        TileConnection {
            tiles: vec![1],
            weights: vec![TILE_CONNECTION_TILES[3].weight],
        },
        // tile_connection_array[2, 3, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 3, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[2, 4, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 0, 0]
        TileConnection {
            tiles: vec![2],
            weights: vec![TILE_CONNECTION_TILES[4].weight],
        },
        // tile_connection_array[3, 0, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 0, 4]
        TileConnection {
            tiles: vec![2],
            weights: vec![TILE_CONNECTION_TILES[4].weight],
        },
        // tile_connection_array[3, 0, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 2, 0]
        TileConnection {
            tiles: vec![2],
            weights: vec![TILE_CONNECTION_TILES[4].weight],
        },
        // tile_connection_array[3, 0, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 2, 4]
        TileConnection {
            tiles: vec![2],
            weights: vec![TILE_CONNECTION_TILES[4].weight],
        },
        // tile_connection_array[3, 0, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 0, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 1, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 2, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 0, 0]
        TileConnection {
            tiles: vec![2],
            weights: vec![TILE_CONNECTION_TILES[4].weight],
        },
        // tile_connection_array[3, 3, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 0, 4]
        TileConnection {
            tiles: vec![2],
            weights: vec![TILE_CONNECTION_TILES[4].weight],
        },
        // tile_connection_array[3, 3, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 2, 0]
        TileConnection {
            tiles: vec![2],
            weights: vec![TILE_CONNECTION_TILES[4].weight],
        },
        // tile_connection_array[3, 3, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 2, 4]
        TileConnection {
            tiles: vec![2],
            weights: vec![TILE_CONNECTION_TILES[4].weight],
        },
        // tile_connection_array[3, 3, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 3, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 0, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 0, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 0, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 0, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 0, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 1, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 1, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 1, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 1, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 1, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 2, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 2, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 2, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 2, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 2, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 3, 0]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 3, 1]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 3, 2]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 3, 3]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
        // tile_connection_array[3, 4, 3, 4]
        TileConnection {
            tiles: vec![],
            weights: vec![],
        },
    ]
)]
// endregion
// generated tests end
fn test_tile_connection_array_new(
    #[case] tiles: Vec<Tile>,
    #[case] horizontal_connector_count: usize,
    #[case] vertical_connector_count: usize,
    #[case] expected_values: Vec<TileConnection>,
) {
    let tile_connection_array = TileConnectionArray::new(&tiles);
    assert_eq!(
        tile_connection_array.shape(),
        [
            vertical_connector_count,
            horizontal_connector_count,
            vertical_connector_count,
            horizontal_connector_count
        ]
    );
    assert_eq!(
        tile_connection_array,
        TileConnectionArray::from_shape_vec(
            (
                vertical_connector_count,
                horizontal_connector_count,
                vertical_connector_count,
                horizontal_connector_count,
            ),
            expected_values,
        )
        .expect("the shape should match the number of elements in expected_values")
    );
}
